from django import forms
from counterpoint.models import Post, ForumUser


class PostForm(forms.ModelForm):

    def __init__(self, *args, **kwargs):
        super(PostForm, self).__init__(*args, **kwargs)
        self.fields['title'].label = 'Subject'
        self.fields['body'].label = 'Message'

    class Meta:
        model = Post
        fields = ('title', 'body', 'sticky', 'locked')


class ForumUserForm(forms.ModelForm):

    class Meta:
        model = ForumUser
        fields = ('nickname', 'avatar', 'website', 'location')
